-- GENERATED SPELL FOR [Apocalypse Guard] --


function spell0_25593(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(40504,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25593', 542, 1)
end

function spell1_25593(pUnit, Event) --@Corrupting Strike,n/a--
pUnit:FullCastSpellOnTarget(45029,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25593', 3000, 1)
end

function spell2_25593(pUnit, Event) --@Death Coil,n/a--
pUnit:FullCastSpellOnTarget(46283,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25593', 3000, 1)
end

function spell3_25593(pUnit, Event) --@Infernal Defense,Self--
pUnit:FullCastSpellOnTarget(46287,pUnit)
pUnit:RegisterEvent('Sorts_25593', 617, 1)
end

function Sorts_25593(pUnit, Event)
local choix_sorts_25593 = math.random(0, 3)
if choix_sorts_25593 == 0 then
pUnit:RegisterEvent('spell0_25593', 1, 1)
end
if choix_sorts_25593 == 1 then
pUnit:RegisterEvent('spell1_25593', 1, 1)
end
if choix_sorts_25593 == 2 then
pUnit:RegisterEvent('spell2_25593', 1, 1)
end
if choix_sorts_25593 == 3 then
pUnit:RegisterEvent('spell3_25593', 1, 1)
end
end

function mob25593_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_25593', math.random(1500, 3000), 1)
end

function mob25593_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25593_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25593_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(25593, 1, 'mob25593_Action')
RegisterUnitEvent(25593, 2, 'mob25593_Leave')
RegisterUnitEvent(25593, 3, 'mob25593_Kill')
RegisterUnitEvent(25593, 4, 'mob25593_Die')
